import request from '@/utils/request'

export function getDepartments(token) {
  return request({
    url: '/api/company/department',
    method: 'get',
    params: { token }
  })
}

export function getEmployeeSimple() {
  return request.get('/api/sys/user/simple')
}

export function addDepartments(data) {
  return request.post('/api/company/department', data)
}

export function delDepartment(id) {
  return request.delete('/api/company/department/' + id)
}

export function getDepartmentById(id) {
  return request.get('/api/company/department/' + id)
}

export function updataDepartments(data) {
  return request.put('/api/company/department/' + data.id, data)
}

